<template>
	<view>
		<custom fixed="fixed" background="rgba(255, 255, 255, 1)" mode="2" title="提现明细"></custom>

		<!-- <view class="cashout" v-if="list.length > 0">
			<view class="cashout-item" v-for="(item,i) in list" :key="i">
				<view class="flex flex-x-b mt-40 fs-26">
					<view class="flex color-222121 fs-30">
						提现金额
					</view>
					<view class="blod fs-32" style="color: #EF4034;vertical-align:bottom;">
						<text>￥</text>
						<text>{{item.amt}}</text>
						
					</view>
				</view>
				<view class="flex flex-x-b mt-20 fs-26">
					<view class="flex color-222121 fs-30">
						手续费
					</view>
					<view class="blod fs-32" style="color: #EF4034;vertical-align:bottom;">
						<text>￥</text>
						<text>{{item.commission}}</text>
						
					</view>
				</view>
				<view class="flex flex-x-b mt-20 fs-26">
					<view class="flex color-222121 fs-30">
						提现时间
					</view>
					<view class="fs-30 color-9B9B9B">
						{{ item.cashOutTime }}
						
					</view>
				</view>
				<view class="flex flex-x-b mt-20 fs-26">
					<view class="flex color-222121 fs-30">
						备注
					</view>
					<view class="fs-30 color-9B9B9B">
						{{ item.remarks }}
					</view>
				</view>
			</view>

		</view> -->

		<view class="cashout" v-if="list.length > 0">
			<view class="cashout-item flex flex-x-b flex-y-center" v-for="(item,i) in list" :key="i">
				<view class="flex flex-d-c flex-x-b mt-40 fs-26">
					<view class="fs-30 color-333333 blod">
						{{item.remarks}}
					</view>
					<view class="flex flex-x-b mt-20 fs-26">
						<view class="fs-30 color-999999">
							{{item.cashOutTime}}
						</view>
					</view>
				</view>
				<view class="blod fs-32" style="color: #EF4034;vertical-align:bottom;">
					<text>￥</text>
					<text>{{item.amt}}</text>
				</view>
			</view>

		</view>
		<qq-footer :list="list" :show="true"></qq-footer>
	</view>
</template>

<script>
	import {
		getCashOutList
	} from './api/course'
	import {
		timestampToTime
	} from './utils'
	export default {
		data() {
			return {
				firstRequst: true,
				list: []
			};
		},
		onLoad() {
			this.getList()
		},
		onShow() {
			if (!this.firstRequst) {
				this.getList()
			}
		},
		methods: {
			async getList() {
				const {
					data
				} = await getCashOutList()
				this.firstRequst = false
				this.list = data.map(item => {
					item.cashOutTime = timestampToTime(item.createTime)
					return item
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: $pageColor;
	}


	.cashout {
		padding: 0rpx 30rpx;
	}

	.cashout-item {
		padding: 40rpx 0;
		border-bottom: 2rpx solid #EBEBEB;
	}

	.color-222121 {
		color: #222121;
	}

	.color-9B9B9B {
		color: #9B9B9B;
	}

	.color-EF4034 {
		color: #EF4034;
	}

	.cashou-input {
		margin-top: 40rpx;
		padding-bottom: 40rpx;
		border-bottom: 2rpx solid #EBEBEB;
	}
</style>